RE: How to forcefully kill an online user session Posted by ~Lisa Lopfoochekgon on 29.Aug.11 at 08:12 AM using a Web browser Category: Applications development Release: 8.5.1 Platform: Windows
Hi Carl,
I tried to do a light login for the user and it is working fine.
But not able to do the logout for teh user.
User is logged in web client and still showing logging in.
Please assist where I am lacking.
Below is the code Sample:
public class LightLoginapp implements LoginListener {
private STSession m_session;
private ServerAppService m_saService;
private Userlogin m_user;
public MuxApplication() {
try {
m_session = new STSession();
} catch (DuplicateObjectException doe) {
doe.printStackTrace();
return;
}
m_session.loadSemanticComponents();
m_session.start();
m_saService = (ServerAppService) m_session
.getCompApi(ServerAppService.COMP_NAME);
m_saService.addLoginListener(this);
short loginType = STUserInstance.LT_MUX_APP;
m_saService.loginAsServerApp(SERVER_NAME, loginType,
"iBPMServlet", null);
}
public void loggedIn(LoginEvent e) {
System.out.println("Mux Application Logged In" + e.getLoginType());
m_user = new Userlogin (m_saService,"nishant");
}
public void loggedOut(LoginEvent e) {
System.out.println("Mux Application Logged Out");
}
public static void main(String[] args) {
// TODO Auto-generated method stub
MuxApplication mx=new MuxApplication();
}
Other Userlogin class as below:
public class Userlogin implements LoginListener,ImServiceListener,ImListener {
private STSession m_session;
private LightLoginService loginService;
private String m_username = "";
private InstantMessagingService m_imService;
private MuxApplication mx;
public Userlogin (ServerAppService saService,String username) {
m_username = username;
try {
m_session = new STSession();
} catch (DuplicateObjectException doe) {
doe.printStackTrace();
return;
}
m_session.loadSemanticComponents();
m_session.start();
loginService=(LightLoginService)m_session.getCompApi(LightLoginService.COMP_NAME);
loginService.setLoginType(STUserInstance.LT_LIGHT_CLIENT_USER);
loginService.addLoginListener(this);
loginService.loginWithoutCredentials(username,saService,null);
}
public void loggedIn(LoginEvent e) {
System.out.println(m_username + " Logged In" + e.getLoginType());
loggedOut(e);
}
public void loggedOut(LoginEvent e) {
System.out.println(e.getIp());
System.out.println("Logged Out");
}
But not able to logout from the sametime.
How to forcefully kill an online us... (~Lisa Lopfooche... 25.Aug.11)
. . RE: How to forcefully kill an onlin... (~Fritz Ekfoober... 25.Aug.11)
. . . . RE: How to forcefully kill an onlin... (~Lisa Lopfooche... 26.Aug.11)
. . . . . . RE: How to forcefully kill an onlin... (~Fritz Ekfoober... 26.Aug.11)
. . . . . . . . RE: How to forcefully kill an onlin... (~Lisa Lopfooche... 29.Aug.11)
. . . . . . . . . . RE: How to forcefully kill an onlin... (~Mark Bubnitexa... 29.Aug.11)
. . . . . . . . . . . . RE: How to forcefully kill an onlin... (~Lisa Lopfooche... 7.Sep.11)
. . . . . . . . . . . . . . RE: How to forcefully kill an onlin... (~Lisa Lopfooche... 7.Sep.11)
. . . . . . . . . . . . . . . . RE: How to forcefully kill an onlin... (~Fritz Ekfoober... 12.Sep.11)
. . . . . . . . . . . . . . . . . . RE: How to forcefully kill an onlin... (~Lisa Lopfooche... 13.Sep.11)
. . . . . . . . . . . . . . . . . . RE: How to forcefully kill an onlin... (~Lisa Lopfooche... 18.Sep.11)
Document Options
Search this forum
RSS Feeds